impl Solution {
    pub fn check_straight_line(coordinates: Vec<Vec<i32>>) -> bool {
        if coordinates[0][0]-coordinates[1][0]==0{
                return coordinates.iter().all(|v|{
                    return v[0]==coordinates[0][0];
                })
        }
        let k :f32=(coordinates[0][1]-coordinates[1][1]) as f32/(coordinates[0][0]-coordinates[1][0])as f32;
        for i in 2..coordinates.len(){
            if coordinates[0][0]-coordinates[i][0]==0{
                return false
            }
            if k!=(coordinates[0][1]-coordinates[i][1]) as f32/(coordinates[0][0]-coordinates[i][0])as f32{
                return  false;
            }
        }
        true
    }
}